<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>格林农场</title>

      <!-- Bootstrap Core CSS -->
    <link href="/Green/Public/assest/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/Green/Public/assest/css/landing-page.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/Green/Public/assest/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
	
	 <link href="/Green/Public/assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/Green/Public/assets/css/dashboard.css" rel="stylesheet">
	
	  <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
   <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
   <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
   <style>
    #pageButton{
			width:80%;
			margin-left:10%;
	   }
	   #left{
			width:50%;
			
	   }
	   #right{
			width:50%;
			margin-left:50%;
			
	   }
	   #top{
		width:100%;
		height:140px;
	   }
		#tleft{
			float:left;
			margin-left:8%;
		}
		#tright{
			height:100%;
		}
		#search{
			margin-top:30px;
			margin-left:40px;
			border-radius:2px;
			border:solid 3px green;
			width:450px;
			height:40px;
		}
		#btn{
			border-radius:5px;
			background-color:grey;
			color:white;
			height:40px;
			width:100px;
		}
	</style>
	<script>
	 	var istrue=false;
		function test(){
			var s1=document.getElementById("pwd").value;
			var s2=document.getElementById("rpwd").value;
			var s3 =document.getElementById("clogodiv");
			if(s1!=s2){
			s3.innerHTML="错误";
			alert("两次密码输入不一致！");
			s3.style.color="red";
			istrue=false;
			}else if(s1!="" && s1==s2){
			 s3.style.color="blue";
			  s3.innerHTML="正确";
			  istrue=true;
			}
		}
		//设置Cookie
		function setCookie(c_name,value,expiredays)
		{
		var exdate=new Date()
		exdate.setDate(exdate.getDate()+expiredays)
		document.cookie=c_name+ "=" +escape(value)+
		((expiredays==null) ? "" : "; expires="+exdate.toGMTString()+"; path=/")
		}
		
		//得到上一个同一个div下的节点
		function getNextElement(node){    
			if(node.nextSibling.nodeType == 1){    //判断下一个节点类型为1则是“元素”节点   
				return node.nextSibling;    
			}    
			if(node.nextSibling.nodeType == 3){      //判断下一个节点类型为3则是“文本”节点  ，回调自身函数  
				return getNextElement(node.nextSibling);    
			}    
			return null;
		}
		//减号
		function butjian(elem){
			val=getNextElement(elem);
			if(val.value==1) return null;
			val.value--;
		}
		function getPreElement(node){    
			if(node.previousSibling.nodeType == 1){    //判断下一个节点类型为1则是“元素”节点   
				return node.previousSibling;    
			}    
			if(node.previousSibling.nodeType == 3){      //判断下一个节点类型为3则是“文本”节点  ，回调自身函数  
				return getPreElement(node.previousSibling);    
			}    
			return null;
		}
		//加号
		function butjia(elem){
			val=getPreElement(elem);
			val.value++;
		}
		
		function show(id){
			val=document.getElementById(id);
			val.style.display="block";
			//alert("显示");
		}
		function hidden(id){
			val=document.getElementById(id);
			val.style.display="none";
			//alert("隐藏");
		}
		//删除购物车里的信息
		function delgoodsofcar(elem){
			gid="g"+elem;
			vid="v"+elem;
			pid="p"+elem;
			good=document.getElementById(gid);
			gvalue=document.getElementById(vid);
			price=document.getElementById(pid);
			allnum=document.getElementById('allnum');//总数量
			allprice=document.getElementById("allprice");//总价
			
			badge=document.getElementById("badge");
			//alert(gvalue.value);
			badge.innerHTML=parseInt(badge.innerHTML)-parseInt(gvalue.value);
			allnum.innerHTML=badge.innerHTML;//总数量
			allprice.innerHTML=parseFloat(allprice.innerHTML)-parseFloat(price.value);//总价
			
			good.parentNode.removeChild(good);
			
			
			
			car=document.getElementById('goods');
			ss=car.innerHTML;
			setCookie('content',ss,1);//设置div内容
			setCookie('badge',badge.innerHTML,1);//设置badge
			setCookie('allprice',allprice.innerHTML,1);//设置总价
		}
		//添加购物车
		function addGoods(elem){		
			car=document.getElementById('goods');
			badge=document.getElementById("badge");
			allnum=document.getElementById('allnum');//总数量
			allprice=document.getElementById("allprice");//总价
			
			gname=getPreElement(elem);
			gprice=getPreElement(gname);
			gpath=getPreElement(gprice);
			gdanwei=getPreElement(gpath);
			gid=getPreElement(gdanwei);
			
			val=getPreElement(gid);
			val=getPreElement(val);
			val=getPreElement(val);
			
			ss=car.innerHTML;
			
			sprice=parseInt(val.value)*parseFloat(gprice.value);
			ss+="<div class='cargoods' id='g"+gid.value+"'>";
			ss+="<input type='hidden' name='num[]' id='v"+gid.value+"' value='"+val.value+"'>";//数量
			ss+="<input type='hidden' name='total[]' id='p"+gid.value+"' value='"+sprice+"'>";//总价
			ss+="<img src='/Green/Public/photo/"+gpath.value+"' width='50px' height='70px'>";
			ss+="<a href=\"javascript:delgoodsofcar('"+gid.value+"')\">X</a>";
			ss+="<div class='cp'>";
			ss+="<p>"+gname.value+"</p>"+gprice.value+"元/"+gdanwei.value+"</div>";
			ss+="<input type='hidden' name='gid[]' value='"+gid.value+"'>";//提交的数据
			ss+="<input type='hidden' name='gname[]' value='"+gname.value+"'>";//提交的数据
			ss+="<input type='hidden' name='price[]' value='"+gprice.value+"'>";//提交的数据
			ss+="<input type='hidden' name='danwei[]' value='"+gdanwei.value+"'>";//提交的数据
			ss+="<input type='hidden' name='path[]' value='"+gpath.value+"'>";//提交的数据
			ss+="<div class='sprice'><p>"+"数量:"+val.value+"</p>总价:"+sprice+"元</div>";
			ss+="</div>";
			
			//alert(ss);		
			car.innerHTML=ss;
			
			badge.innerHTML=parseInt(badge.innerHTML)+parseInt(val.value);			
			allnum.innerHTML=badge.innerHTML;//总数量
			allprice.innerHTML=parseFloat(allprice.innerHTML)+sprice;//总价
			
			setCookie('content',ss,1);//设置div内容
			setCookie('badge',badge.innerHTML,1);//设置badge
			setCookie('allprice',allprice.innerHTML,1);//设置总价
		}
				
	 </script>
</head>
<?php  function unescape($str) { $ret = ''; $len = strlen($str); for ($i = 0; $i < $len; $i ++) { if ($str[$i] == '%' && $str[$i + 1] == 'u') { $val = hexdec(substr($str, $i + 2, 4)); if ($val < 0x7f) $ret .= chr($val); else if ($val < 0x800) $ret .= chr(0xc0 | ($val >> 6)) . chr(0x80 | ($val & 0x3f)); else $ret .= chr(0xe0 | ($val >> 12)) . chr(0x80 | (($val >> 6) & 0x3f)) . chr(0x80 | ($val & 0x3f)); $i += 5; } else if ($str[$i] == '%') { $ret .= urldecode(substr($str, $i, 3)); $i += 2; } else $ret .= $str[$i]; } return $ret; } ?>
<body>

<!-- 模态框（Modal）（登陆） -->
<div class="modal fade" id="login" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
	   <div class="modal-dialog">
		  <div class="modal-content">
			 <div class="modal-header">
				<button type="button" class="close" 
				   data-dismiss="modal" aria-hidden="true">
					  &times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
				   登陆
				</h4>
			 </div>
			 <!--登陆主体 -->
			 <div class="modal-body">
			   <form action="<?php echo U('Login/dologin');?>" method="POST" role="form" >
				<table class="table">
					<tr>
						<th>手机号码:</th><td><input type="text" name="phone" 
						class="form-control" 
						placeholder="手机号码"></td>
					</tr>
					<tr>
						<th>密码:</th><td><input type="password" name="pass" 
						class="form-control"
						placeholder="password"></td>
					</tr>
				</table>
				<input type="submit" name="sub" class="btn-block btn-lg btn-primary" value="登陆">
			</form>
			 </div>
		  </div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>

<!-- 模态框（Modal）（注册） -->
<div class="modal fade" id="register" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
	   <div class="modal-dialog">
		  <div class="modal-content">
			 <div class="modal-header">
				<button type="button" class="close" 
				   data-dismiss="modal" aria-hidden="true">
					  &times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
				   请填写注册信息
				</h4>
			 </div>
			 <!--登陆主体 -->
			 <div class="modal-body">
		<form role="form" action="<?php echo U('Index/register');?>" method="post" enctype="multipart/form-data">
		<table class="table" align="center">
		<tr><th>姓名</th><td><input type="text" class="form-control" id="name" name="name"
		required oninvalid="setCustomValidity('请填写姓名')"
					oninput="setCustomValidity('')"></td></tr>
			<tr>
				<th>
				 创建密码：
				</th>
				<td>
					<input type="password" name="password" id="pwd" class="form-control" placeholder="password" required oninvalid="setCustomValidity('请填写密码')"
					oninput="setCustomValidity('')">
				</td>
			</tr>
			<tr>
				<th>
				 确认密码：
				</th>
				<td>
					<input type="password" name="rpwd" id="rpwd" class="form-control" required="required" placeholder="password"
					onblur="test()" required oninvalid="setCustomValidity('请再次填写密码')"
					oninput="setCustomValidity('')">
				</td>
				<td>
					<p id="clogodiv">
						
					</p>
				</td>
			</tr>
		<tr>
		<th>地址</th><td><textarea name="location" class="form-control" rows="3" cols="20"
		placeholder="请填写具体一些，方便我们给您送货到家！"></textarea></td>
		</tr>
		<tr><th>手机号码</th><td><input  class="form-control" id="name" name="phone"
		required oninvalid="setCustomValidity('请填写手机号码')"
					oninput="setCustomValidity('')"></td></tr>
		<tr>
		<th>头像</th><td><input type="file" name="pic" class="form-control" ></td>
		</tr>
	</table>
	<div id="pageButton">
		<span id="left">
		<button type="button" class="btn btn-default" 
               data-dismiss="modal">关闭
            </button>
		</span>
		<span id="right">
            <button type="submit" class="btn btn-primary">
               注册
            </button>
		</span>
    </div>
	 </form>
	 </div>
	</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>


<div id="content">
    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
        <div class="container topnav">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand topnav" >欢迎光临格林农场!</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
					 <li>
                       <a href="<?php echo U('Index/index');?>">首页</a>
                    </li> 
					 <li>
                       <a href="<?php echo U('List/news');?>">新闻</a>
                    </li> 					
				<?php  if(isset($_SESSION['user'])){ $flag=$_SESSION['user']['name']; } ?>
				
				<?php if(empty($flag)): ?><li><a href='#' data-toggle='modal'  data-target='#login'>登录</a>
                    </li>
                    <li>
                        <a href='#' data-toggle='modal'  data-target='#register'>注册</a>
                    </li>
				<?php else: ?>
					<li><a href="/Green/profile.php/Video/index"><?php echo ($flag); ?>欢迎使用</a>
                    </li>
                    <li>
                        <a href='<?php echo U('Login/logout');?>' >注销</a>
                    </li><?php endif; ?>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
			</div>
        <!-- /.container -->
	</nav>
</div>
</div>
<div id="top">
	<span id="tleft">
		<img src="/Green/Public/assest/image/logo.jpg" width="300px">	
	</span>
	<span id="tright">
	<!--搜索框-->
	<form action="<?php echo U('List/search');?>" method="get" class="navbar-form navbar-left">
	<input type="text" name="searchname" id="search" placeholder="蔬菜名称"
	<?php  var_dump($searchname);if(isset($searchname)) echo "value='".$searchname."'";?>>	
	<input type="submit" id="btn" value="搜索">	
	</form>
	</span>
<hr width="100%" style="margin-top:-5px;border:2px solid white;">
<hr width="100%" style="margin-top:-5px;border:2px solid green;">
</div>
	</style>
	 <style >
	   .suoluetu{
	    margin:0 auto;
	    width:95%;
	   }
		a:link,a:visited{
			text-decoration:none;  /*超链接无下划线*/
		}
		.xinfo{
			font-size:15px;
		}
	   .daohang-lable{
		   margin-left:2%;
		   height:80px;
		   font-size:40px;
		   
	   }
	   .togo{
		font-size:20px;
	   }
	   #pageButton{
			width:80%;
			margin-left:10%;
	   }
	   #left{
			float:left;
			width:22%;
			border:solid 2px #D9D9D9;
	   }
	   #right{
			width:80%;
			margin-left:25%;
	   }
	   #footer{
			width:100%;
			text-align:center;
	   }
	   #mainbody{
			width:80%;
			margin-left:5%;
	   }
	    #mm{
			width:100%;
	   }
	   #px{
		width:100%;
		height:45px;
		background-color:#D9D9D9;	
	   }
	   .pxfont{
		float:left;
		width:50px;
		height:40px;
		line-height:28px;
		text-align:center;
	   }
	   .paixu{
			float:left;
			width:65px;
			height:40px;
	   }
	   .btn-px{
			background-color:white;
			border-radius:5px;
	   }
	   .title{
			text-align:center;
	   }
		.disdiv{
			float:left;
			width:80%;
			height:300px;
			margin-left:20px;
		}
		.imgpic{
			margin-left:25px;
		}
		.caption{
			text-align:center
		}
		#maincontent{
			width:100%;
			
		}
		.price{
			font-size:20px;
			color:red;
		}
		.captionfoot{
			width:100%;
			margin-left:5%;
			margin-bottom:2%;
		}
		.captionfoot{
			width:40px;
		}
		.rcaptionfoot{
			width:100px;
		}
		.btn-car{
			border-radius:5px;
			background-color:white;
			width:120px;
		}
		.min{
			border-radius:5px;
			background-color:white;
			width:30px;
		}
		.add{
			border-radius:5px;
			background-color:white;
			width:30px;
		}
		.thumbnail{
			height:380px;
		}
		.thumbnail:hover{
			border:3px green solid;
		}
		#shoppingcar-block{
			position:fixed;
			top:40%;
			right:20px;
			left: 91%;
			width:6%;
			height:200px;
			
			text-align:center;
			color:grey;
		}
		#displayshopcar{
			position:fixed;
			top:180px;
			right:120px;
			width:300px;
			height:380px;
			background-color:white;
			border:3px solid grey;
			border-radius:5px;
			display:none;
			overflow-y:auto;
		
		}
		#displayshopcar-top{
			background-color:grey;
			width:100%;
			height:70px;
		}
		#exit{
			margin-left:5px;
			font-size:15px;
			width:50px;
		}
		#jiesuan{
			width:50%;
			font-size:20px;
			margin-left:25%;
			font-color:green;
			background-color:green;
		}
		#jiesuan:hover{
			font-color:green;
			background-color:blue;
		}
		.cargoods{
			width:100%;
			height:80px;
			border:1px solid green;
			border-radius:3px;
		}
		.cp{
			width:30%;
			float:left;
		}
		.sprice{
			float:left;
			width:40%;
		}
		.breadcrumb{
			width:105%;
		}
     </style>
	 
	 <div id="mainbody">
	 <ol class="breadcrumb">
		<li><a href="<?php echo U('Index/index');?>">首页</a></li>
		<li class="active"><a href="">搜索结果</a></li>
	</ol>
 		<div id="left">
		<p class="title">销量排行榜</p>
		<hr>
		<div class='row'>
			<?php if(is_array($phblist)): $i = 0; $__LIST__ = $phblist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i; $picpath=str_replace("thumb_","",$voo['pic']); ?>
			<div class="disdiv">
				  <a onmouseover='window.location.href='#''
				  style='cursor:pointer;' href="<?php echo U('List/showgood',array('id'=>$voo['id']));?>">
					 <img class="imgpic" src='/Green/Public/photo/<?php echo ($picpath); ?>'  width="80%" height="150px"
					 alt='通用的占位符缩略图'>
				 </a>
					 <div class='caption' >
						<a href="<?php echo U('List/showgood',array('id'=>$voo[id]));?>"><?php echo ($voo["name"]); ?></a> <br>
						<a  href="<?php echo U('List/showgood',array('id'=>$voo[id]));?>" ><?php echo ($voo["lintro"]); ?></a>
						
					 <p>￥<?php echo ($voo["price"]); ?>元/<?php echo ($voo["danwei"]); ?></p></div>
					 <hr>
			</div><?php endforeach; endif; else: echo "" ;endif; ?>
		</div>			
		</div><!--left-->
		<div id="right">
			<hr width="100%" style="border:solid 1px green">
			<div id="px"><!--排序框-->
			<div class="pxfont"><p>排序:</p></div>
			<div class="paixu">
			<!--时间排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="id">
					<input type="hidden" name="name" value="<?php echo ($classmeg['name']); ?>">
					<?php if($classmeg['mode'] == 'id'): if(($classmeg['dec'] == 'desc')): ?><input type="hidden" name="dec" value="asc">
							<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<?php else: ?>
							<input type="hidden" name="dec" value="desc">
							<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-down"></span>
							</button><?php endif; ?>
					<?php else: ?> 
						<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
							时间<span class="glyphicon glyphicon-arrow-down"></span>
							</button><?php endif; ?>
				</form>
			</div>
			<div class="paixu">
			<!--销量排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="sum">
					<input type="hidden" name="name" value="<?php echo ($classmeg['name']); ?>">
					<?php if($classmeg['mode'] == 'sum'): if(($classmeg['dec'] == 'desc')): ?><input type="hidden" name="dec" value="asc">
							<button type="submit" class="btn-px">
							销量<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<?php else: ?>
							<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
						销量<span class="glyphicon glyphicon-arrow-down"></span>
						</button><?php endif; ?>
					<?php else: ?> 
						<input type="hidden" name="dec" value="desc">
						<button type="submit" class="btn-px">
						销量<span class="glyphicon glyphicon-arrow-down"></span>
						</button><?php endif; ?>
				</form>
			</div>
			<div class="paixu">
			<!--价格排序-->
				<form method="GET">
					<input type="hidden" name="searchname" id="search" placeholder="蔬菜名称"
					<?php  if(isset($searchname)) echo "value='".$searchname."'";?>>	
					<input type="hidden" name="mode" value="price">
					<input type="hidden" name="name" value="<?php echo ($classmeg['name']); ?>">
					<?php if($classmeg['mode'] == 'price'): if(($classmeg['dec'] == 'desc')): ?><input type="hidden" name="dec" value="asc"><!--升序-->
							<button type="submit" class="btn-px">
							价格<span class="glyphicon glyphicon-arrow-up"></span>
							</button>
						<?php else: ?>
							<input type="hidden" name="dec" value="desc">
							<button type="submit" class="btn-px">
							价格<span class="glyphicon glyphicon-arrow-down"></span>
							</button><?php endif; ?>
					<?php else: ?> 
						<input type="hidden" name="dec" value="desc"><!--降序-->
						<button type="submit" class="btn-px">
						价格<span class="glyphicon glyphicon-arrow-down"></span>
						</button><?php endif; ?>
				</form>
			</div>
			</div><!--排序框-->
			<div id="maincontent">
				<hr width="100%" style="border:solid 1px green">
				<div class="row">
				<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i; $picpath=str_replace("thumb_","",$voo['pic']); ?>
					<div class="col-sm-6 col-md-3">
					<div class="thumbnail">
					 <a class="pp" href="<?php echo U('List/showgood',array('id'=>$voo[id],'cid'=>$classmeg['id'],'cname'=>$classmeg['name']));?>">
						<img src='/Green/Public/photo/<?php echo ($picpath); ?>'  width="120px" height="150px"
						 alt="通用的占位符缩略图">
						<div class="caption">
							<p><?php echo ($voo["name"]); ?>&nbsp&nbsp|&nbsp&nbsp<?php echo ($voo["lintro"]); ?></p>
						 <p class="price" >￥<?php echo ($voo["price"]); ?>元/<?php echo ($voo["danwei"]); ?></p></a>
						</div>
						<div class="captionfoot">
						<div class="lcaptionfoot">
						 <?php if(0 < $voo['kucun']): ?><p>有货</p> <?php else: ?> <p>无货</p><?php endif; ?>
						 </div>
						 <div class="rcaptionfoot">
								<input class="min" name="" type="button" value="-" onclick="javascript:butjian(this)"/>
								<input class="text_box" name="goodnum" type="text" value="1" style="width:25px;" />
								<input class="add" name="" type="button" onclick="javascript:butjia(this)" value="+" />
								<hr>
								
								<input name="" type="hidden"  value="<?php echo ($voo["id"]); ?>" />
								<input name="" type="hidden"  value="<?php echo ($voo["danwei"]); ?>" />
								<input name="" type="hidden"  value="<?php echo ($picpath); ?>" />
								<input name="" type="hidden"  value="<?php echo ($voo["price"]); ?>" />
								<input name="" type="hidden"  value="<?php echo ($voo["name"]); ?>" />
								<button type="submit" class="btn-car" onclick="javascript:addGoods(this)" ><span class="glyphicon glyphicon-shopping-cart"></span>加入购物车</button>
						 </div>						  
						 </div>
					</div>
					 </div><?php endforeach; endif; else: echo "" ;endif; ?>
				</div><!--row-->
				
				<div class="text-center">
				<ul class="pagination"><?php echo ($page); ?></ul>
				</div>
			</div><!--maincontent-->
		</div><!--right-->
	</div><!--mainbody-->
	
	<div id="displayshopcar">
	<form method="POST" action="<?php echo U('Pay/index');?>">
		<div id="displayshopcar-top">
			<a id="exit" href="javascript:hidden('displayshopcar')">X</a><br>
			<input id="jiesuan" type="submit" value="￥去结算">
		</div>
		<div>总量：<span id="allnum">
		<?php if(isset($_COOKIE['badge'])) echo $_COOKIE['badge']; else echo "0";?>
		</span>总价：<span id="allprice">
		<?php if(isset($_COOKIE['allprice'])) echo $_COOKIE['allprice'];else echo "0";?></span>元</div>
		<hr>
		<div id="goods">
			<?php if(isset($_COOKIE['content'])) echo unescape($_COOKIE['content']);?>
		</div>
		</form>
	</div>
	<div id="shoppingcar-block">
		<a href="javascript:show('displayshopcar')">
			<span class="badge" id="badge"><?php if(isset($_COOKIE['badge'])) echo $_COOKIE['badge']; else echo "0";?></span><img src="/Green/Public/assest/image/shopcar.png" width="100%">
		</a>
		<p>购物车</p>
		<hr>
	</div>
</body>
<hr>
    <!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-12" align="center">
                    <p class="copyright text-muted small">Copyright 2016-2017 | <a href="/Green/admin.php/Login/login">Yangjianli</a> All Rights Reserved<br>站长邮箱:574153393@qq.com</p>
                </div>	
            </div>
        </div>
    </footer>

</html>